var __extends =
    (this && this.__extends) ||
    (function () {
      var o = function (e, t) {
        return (o =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (o, e) {
              o.__proto__ = e;
            }) ||
          function (o, e) {
            for (var t in e)
              Object.prototype.hasOwnProperty.call(e, t) && (o[t] = e[t]);
          })(e, t);
      };
      return function (e, t) {
        function n() {
          this.constructor = e;
        }
        if ("function" != typeof t && null !== t)
          throw new TypeError(
            "Class extends value " + String(t) + " is not a constructor or null"
          );
        o(e, t),
          (e.prototype =
            null === t
              ? Object.create(t)
              : ((n.prototype = t.prototype), new n()));
      };
    })(),
  AXMarketView = (function (o) {
    function e() {
      var e = o.call(this) || this;
      return (
        e.onLoadshiChangResourceFn(),
        e.btn_market_back.on(Laya.Event.CLICK, e, e.onPreMarketBack),
        e.btn_grocery_shop.on(Laya.Event.CLICK, e, e.onGroceryShopFn),
        e.btn_tiaosao.on(Laya.Event.CLICK, e, e.onTiaoSaoShiChangFn),
        e.btn_schmied_shop.on(Laya.Event.CLICK, e, e.onSchmiedShopFn),
        e.btn_market_dangpu.on(Laya.Event.CLICK, e, e.onMarketDangPuFn),
        e.btn_equimentHome.on(Laya.Event.CLICK, e, e.onEquimentHomeFn),
        e
      );
    }
    return (
      __extends(e, o),
      (e.openMarketView = function () {
        return null == this.markVC && (this.markVC = new e()), this.markVC;
      }),
      (e.prototype.onLoadshiChangResourceFn = function () {
        Laya.loader.retryNum = 2;
        var o = [
          { url: "res/atlas/comp.atlas", type: Laya.Loader.ATLAS },
          { url: "res/atlas/comp/happy.atlas", type: Laya.Loader.ATLAS },
          { url: "res/atlas/comp/commonpic.atlas", type: Laya.Loader.ATLAS },
        ];
        Laya.loader.load(
          o,
          Laya.Handler.create(this, this.OnLoadedRecourse),
          Laya.Handler.create(
            AXProgressBarView,
            AXProgressBarView.onLoadedRecourse,
            null,
            !1
          )
        );
      }),
      (e.prototype.OnLoadedRecourse = function () {}),
      (e.prototype.onGroceryShopFn = function () {
        var o = AXShoppingItemView.openView();
        o.pos(0, 35), Laya.stage.addChild(o);
      }),
      (e.prototype.onMarketDangPuFn = function () {
        var o = DPPawnShopView.openView();
        o.pos(0, 35), Laya.stage.addChild(o);
      }),
      (e.prototype.onTiaoSaoShiChangFn = function () {
        var o = AXFlyMarketView.openFlyMarketView();
        o.pos(0, 35), Laya.stage.addChild(o);
      }),
      (e.prototype.onEquimentHomeFn = function () {
        var o = AXEquipmentView.openEquipmentView();
        o.pos(0, 35), Laya.stage.addChild(o);
      }),
      (e.prototype.onSchmiedShopFn = function () {
        var o = AXBlackSmithView.showBlackSmith();
        o.pos(0, 35), Laya.stage.addChild(o);
      }),
      (e.prototype.onPreMarketBack = function () {
        this.removeSelf();
      }),
      e
    );
  })(ui.MarketController.AXMarketViewUI);
